<?php
/**
 * Created by PhpStorm.
 * User: liyongyao
 * Date: 2018/7/31
 * Time: 23:53
 */

namespace app\index\controller;


class go
{
    use  \traits\controller\Jump;

    public function index($name){
        if('thinkphp'==$name){
            $this->success('欢迎使用','hello');
        }else{
            $this->error('错误的','guest');
        }
    }

    public function hello(){
        return 'hello ';
    }

    public function guest(){
        return ' guest ';
    }


    public function gogo($name=''){
        if('lyy'==$name){
            return redirect('http://baidu.com');
        }else{
            return 'hello '.$name;
        }

    }
}